package com.xjoyt.pay.operater.controllers;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xjoyt.pay.controllers.AbstractController;
import com.xjoyt.pay.dto.ExecuteResult;
import com.xjoyt.pay.operater.auth.interfaces.CompanyContract;
import com.xjoyt.pay.operater.services.CompanyService;

@RestController
@RequestMapping("company")
public class CompanyController extends AbstractController implements CompanyContract {

	@Autowired
	private CompanyService service;

	@Override
	public List<String> getNodeList(@PathVariable("id") String id) {
		return service.getNodeList(id);
	}

	@Override
	public ExecuteResult<?> saveNode(@PathVariable("id") String id, @RequestBody List<String> nodeList) {
		return service.saveNode(id, nodeList);
	}

}
